import {BaseUI} from "../../Framework/Base/BaseUI";
import {SkillConfig} from "../../Framework/Config/SkillConfig";
import {ConfigManager} from "../../Framework/Managers/ConfigManager";
import {UIManager} from "../../Framework/Managers/UIManager";

const {ccclass, property} = cc._decorator;
@ccclass
export default class TestUI extends BaseUI {
    protected static className = "TestUI";

    @property(cc.Node)
    private close_btn:cc.Node=null;

    private skill:SkillConfig=null;

    onLoad(){
        ConfigManager.getInstance().loadAllConfig([SkillConfig],(arg:any)=>{
            this.skill = ConfigManager.getInstance().getConfig(SkillConfig) as SkillConfig;
            console.log(this.skill);
        });
        
        this.close_btn=this.node.getChildByName('close_btn');
        this.close_btn.on(cc.Node.EventType.TOUCH_START,function () {
            // UIManager.getInstance().hideUI(TestUI);
            this.node.destroy();
        },this);
    }
    onShow(){
        super.onShow();
        console.log('onShow:TestUI');
    }
}
